package cn.zhihong.org.mapper;

import cn.zhihong.org.domain.Department;
import cn.zhihong.org.query.DepartmentQuery;

import java.util.List;

/**
 * 部门的mapper
 */
public interface DepartmentMapper {

    //基础的查询
    List<Department> loadAll();

    Department loadById(Long id);

    void save(Department department);
    void update(Department department);
    void remove(Long id);

    //分页方法1.查询总条数
    Long queryCount(DepartmentQuery query);

    //分页方法2,查询当前页的数据
    List<Department> queryData(DepartmentQuery query);


}
